﻿using UnityEngine;
using UnityEngine.UI;
class EnemyHealthBarView : MonoBehaviour, IEnemyHitPointListener
{
    Slider slider;
    public void OnHitPoint(EnemyEntity entity, int value)
    {
        slider.value = value;
    }

    private void Start()
    {
        slider = GetComponent<Slider>();
        transform.parent.parent.GetComponent<EnemyView>().enemyEntity.AddEnemyHitPointListener(this);
    }
}

